home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / naps / 04 / setup.exe / Gnucleus / ViewSearch.h < prev    next >
C/C++ Source or Header  |  2000-07-15  |  3KB  |  115 lines

  1. #if !defined(AFX_VIEWSEARCH_H__1AE2E5DB_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
  2. #define AFX_VIEWSEARCH_H__1AE2E5DB_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // ViewSearch.h : header file
  8. //
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CViewSearch form view
  12.  
  13. #ifndef __AFXEXT_H__
  14. #include <afxext.h>
  15. #endif
  16.  
  17. #pragma warning (disable : 4786)
  18.  
  19. #include <list>
  20. #include "ListCtrlEx.h"
  21.  
  22. class CViewSearch : public CFormView
  23. {
  24. protected:
  25.     CViewSearch();           // protected constructor used by dynamic creation
  26.     DECLARE_DYNCREATE(CViewSearch)
  27.  
  28. // Form Data
  29. public:
  30.     //{{AFX_DATA(CViewSearch)
  31.     enum { IDD = IDD_SEARCH };
  32.     CButton    m_btnDownload;
  33.     CEdit    m_eSubsearch;
  34.     CEdit    m_eExclude;
  35.     CButton m_btnPushRequest;
  36.     CStatic    m_stcMatches;
  37.     CStatic    m_stcSubsearch;
  38.     CStatic    m_stcExclude;
  39.     CListCtrlEx    m_lstResults;
  40.     //}}AFX_DATA
  41.  
  42. // Attributes
  43. public:
  44.     GUID    myGuid;
  45.     CString keyword;
  46.     int        length;
  47.     WORD    BytesPerSec;
  48.  
  49.     int matches; // total results that came back
  50.  
  51.     void Send_Query();
  52.     void UpdateResults(byte *);
  53. // Operations
  54. public:
  55.     void AdjustBottomControl(CWnd* cntl, int bot);
  56.     void ListFromReplies();
  57.  
  58. // Overrides
  59.     // ClassWizard generated virtual function overrides
  60.     //{{AFX_VIRTUAL(CViewSearch)
  61.     public:
  62.     virtual void OnInitialUpdate();
  63.     protected:
  64.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  65.     //}}AFX_VIRTUAL
  66.  
  67. // Implementation
  68. protected:
  69.     QueryItem& FindQueryItemFromListIndex(int nItem);
  70.     bool ExcludeTest(CString exclude, CString name);
  71.     void StartDownload(int nItem);
  72.     void AssignHeaderText();
  73.     CGnucleusDoc *Doc;
  74.     CGnuControl  *Comm;
  75.         
  76.     int row; // how many results shown -- also number of items in list
  77.     std::list<QueryItem> Replies;
  78.  
  79.     CString subsearchText, excludeText;
  80.  
  81.  
  82.     WORD     GetSpeedinBytes(CString);
  83.     POSITION FindQueryPosByHandle(int);
  84.     bool     CompareQueries(POSITION, POSITION, int);
  85.     bool     InspectFile(CString);
  86.     bool     NoScroll;
  87.  
  88.     virtual ~CViewSearch();
  89. #ifdef _DEBUG
  90.     virtual void AssertValid() const;
  91.     virtual void Dump(CDumpContext& dc) const;
  92. #endif
  93.  
  94.     // Generated message map functions
  95.     //{{AFX_MSG(CViewSearch)
  96.     afx_msg void OnSize(UINT nType, int cx, int cy);
  97.     afx_msg void OnDblclkListResults(NMHDR* pNMHDR, LRESULT* pResult);
  98.     afx_msg void OnButtonDownload();
  99.     afx_msg void OnClickListResults(NMHDR* pNMHDR, LRESULT* pResult);
  100.     afx_msg void OnRightClickListResults(NMHDR* pNMHDR, LRESULT* pResult);
  101.     afx_msg void OnItemclickListResults(NMHDR* pNMHDR, LRESULT* pResult);
  102.     afx_msg void OnColumnclickListResults(NMHDR* pNMHDR, LRESULT* pResult);
  103.     afx_msg void OnChangeSubsearch();
  104.     afx_msg void OnChangeExclude();
  105.     //}}AFX_MSG
  106.     DECLARE_MESSAGE_MAP()
  107. };
  108.  
  109. /////////////////////////////////////////////////////////////////////////////
  110.  
  111. //{{AFX_INSERT_LOCATION}}
  112. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  113.  
  114. #endif // !defined(AFX_VIEWSEARCH_H__1AE2E5DB_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
  115.